<template>
	<component :is="f.getVNode()"></component>

	<el-button @click="get">get</el-button>
	<el-button @click="set">set</el-button>
</template>

<script setup lang="ts">
import { BasicFormBox } from "@pkg";

const f = new BasicFormBox({ options: [], layout: "vertical" });

f.addFormItem({
	component: "UploadImg",
	key: "img",
	label: "sssss",
	value: "",
	conf: {
		limit: 1,
	},
});
f.addFormItem({
	component: 'Map',
	key: 'map',
	label: '地图',
	conf: {
		"type": 'opt'
	},
	value: ''
})

const get = () => {
	console.log(f.getFormValue(), "sdddadadadad");
};
const set = () => {
	// f.setFormValue({
	// 	file: "dddddddddddddddddddddd",
	// });
	f.setFormItemValue('map', '12,113')
};
</script>

<style lang="scss" scoped></style>
